Skip to contentSkip to conversation

um: Add kerneldoc for segv_handler

PATCH In review Thomas Meyer 1 participant 1 message May 14, 2017 User-mode Linux (UML)

lore
Share & tools
lore
#0 lore raw

PATCH 2/3 um: Add kerneldoc for segv_handler

---
 arch/um/kernel/trap.c | 10 ++++++++++

 1 file changed, 10 insertions(+)
arch/um/kernel/trap.c +0 -0
index 5915887..4e6fcb3 100644
@@ -183,6 +183,16 @@ void fatal_sigsegv(void)

  os_dump_core();
 }

+/**
+ * segv_handler() - the SIGSEGV handler
+ * @sig: the signal number
+ * @unused_si: the signal info struct; unused in this handler
+ * @regs: the ptrace register information
+ *
+ * The handler first extracts the faultinfo from the UML ptrace regs struct.
+ * If the userfault did not happen in an UML userspace process, bad_segv is called.
+ * Otherwise the signal did happen in a cloned userspace process, handle it.
+ */
 void segv_handler(int sig, struct siginfo *unused_si, struct uml_pt_regs *regs)
 {
  struct faultinfo * fi = UPT_FAULTINFO(regs);

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel